FROM golang:1.18

ENV GOPROXY https://goproxy.cn,direct
WORKDIR $GOPATH/src/github.com/WULINLIN/jenkins-docker-go-demo
COPY . $GOPATH/src/github.com/WULINLIN/jenkins-docker-go-demo
RUN go mod tidy
RUN go build .

EXPOSE 8023
ENTRYPOINT ["./jenkins-docker-go-demo"]